<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	.addtd{border:1px solid #f5f5f5; padding-left: 15px;}
	.addtdother{border:1px solid #f5f5f5; padding-left: 15px; border-top: none;}
</style>
</head>
<body class="easyui-layout">
<!-- 投诉信息 -->
<div data-options="region:'north',collapsible:false,title:'投诉信息'" style="padding:10px;height:357px;">
		<form id="form_add_com_bill" method="post" class="easyui-form" data-options="novalidate:true">
			<div style="width:99%; margin-left: auto; margin-right: auto; line-height: 35px; font-size: 12px; background-color: #e0ecff; border-bottom: solid 2px #95b8e7; color: #0e2d5f; padding-left: 15px; font-weight: bold;">客户信息</div>
			
			<table style="width:99%; margin-left: auto; margin-right: auto; line-height: 35px; font-size: 12px; background-color:#f9fdff;">
				<tr>
					<td class="addtd" style="text-align: left; width: 90px;">姓名</td>
					<td class="addtd" style="border-left:none; width:200px"><input class="easyui-textbox" data-options="required:true,prompt:'请输入姓名',missingMessage:'姓名为必填项'" type="text" name="name"></input></td>
					<td class="addtd" style="border-left:none; text-align: left; width: 90px;">电话</td>
					<td class="addtd" style="border-left:none; width:200px"><input class="easyui-textbox" type="text" data-options="required:true,validType:'phoneRex',invalidMessage:'电话格式不正确',prompt:'请输入电话',missingMessage:'电话为必填项'"  name="mphone"></input></td>
					<td class="addtd" style="border-left:none; text-align: left; width: 90px;">地址</td>
					<td class="addtd" style="border-left:none;"><input class="easyui-textbox" type="text" style="width: 100%" data-options="required:true,prompt:'请输地址',missingMessage:'地址为必填项'" name="address"></input></td>
				</tr>
			</table>
			<table style="width:99%; margin-left: auto; margin-right: auto; line-height: 35px; font-size: 12px; background-color:#f9fdff;">
				<tr>
					<td class="addtdother" style="text-align: left; width: 90px;">原因</td>
					<td class="addtdother" style="border-left:none;">
						<input class="easyui-textbox" type="text" style="width: 100%;height:90px" name="resons" data-options="required:true,prompt:'请输入原因',missingMessage:'原因为必填项',multiline:true"></input>
					</td>
				</tr>
			</table>
			<table style="width:99%; margin-left: auto; margin-right: auto; line-height: 35px; font-size: 12px; background-color:#f9fdff;">
				<tr>
					<td class="addtdother" style="text-align: left; width: 90px;">内容</td>
					<td class="addtdother" style="border-left:none;">
						<input class="easyui-textbox" type="text" style="width: 100%;height:90px" data-options="multiline:true" name="content"></input>
					</td>
				</tr>
			</table>
			<table style="width:99%; margin-left: auto; margin-right: auto; line-height: 35px; font-size: 12px; background-color:#f9fdff;">
				<tr>
					<td class="addtdother" style="text-align: right; padding-right: 15px">
						<a href="javascript:void(0)" class="easyui-linkbutton" id="btn_add_combill" iconCls="icon-add">添加</a>
					</td>
					<td class="addtdother" style="border-left:none; padding-right: 15px">
						<a href="javascript:void(0)" class="easyui-linkbutton" id="btn_clear_combill" iconCls="icon-clear">取消</a>
					</td>
				</tr>
			</table>
			
		</form>
</div>
<!-- 投诉列表 -->
<div data-options="region:'center',title:'投诉列表'">
	<table id="datagrid" class="easyui-datagrid" data-options="singleSelect:true,fit:true,fitColumns:true,
		pagination:true,pageSize:15,pageList:[5,10,15,20],url:'search'">
		<thead>
			<tr>
				<th data-options="field:'CUSTOMER_NAME',width:10">客户姓名</th>
				<th data-options="field:'CMPHONE',width:10">客户电话</th>
				<th data-options="field:'CUST_ADDRESS',width:20">客户地址</th>
				
				<th data-options="field:'TYPE',width:10">单据类型</th>
				<th data-options="field:'TRUE_NAME',width:10">接线员</th>
				
				<th data-options="field:'CREATE_TIME',width:10">投诉时间</th>
				<th data-options="field:'UNIT_NAME',width:10">当前处理部门</th>
				<th data-options="field:'REASON',width:20">原因</th>
				<th data-options="field:'CONTENT',width:20">内容</th>
				<th data-options="field:'ACTIVE',width:10">状态</th>
			</tr>
		</thead>
	</table>
</div>
</body>
</html>
<@h.easyui />
<script type="text/javascript">
jQuery(document).ready(function(){
	jQuery("#btn_add_combill").click(function(){
		if(!jQuery("#form_add_com_bill").form("enableValidation").form("validate")){
			return;
		}
		jQuery("#form_add_com_bill").form("submit",{
			success:function(data){
				var obj = eval('(' + data + ')');
				if(obj.success){
					jQuery.messager.alert("系统提示",obj.message,"info");
					jQuery("#datagrid").datagrid("reload");
				}else{
					jQuery.messager.alert("系统提示",obj.message,"info");
				}
			},
			url:"addComBill"
		});
	});
	jQuery("#btn_clear_combill").click(function(){
		jQuery("#form_add_com_bill").form("clear");
		jQuery("#form_add_com_bill").form("disableValidation");
	});
});
</script>